package pages;

import org.openqa.selenium.By;
import selenium.WebDriverWrapper;
import utils.Log4Test;

/**
 * Created by sergey on 04.08.2014.
 */
public class CartPage extends BasicPage {
    private static final By EDIT_ORDER_BUTTON_LOCATOR = By.xpath("//a[@title='Edit item']");
    public CartPage(WebDriverWrapper driver)
    {
        super (driver);
        URL = "https://www.freddydiamonds.com/index.php/checkoutcart/checkout_cart/";
        driver.get(URL);
    }
    public void pushEditButton()
    {
        driver.findElement(EDIT_ORDER_BUTTON_LOCATOR).click();
        Log4Test.info("Edit button has been clicked, moving to PickYourRingPage expected");
    }
    public boolean pageChecker()
    {
        return !driver.getCurrentUrl().equals("https://www.freddydiamonds.com/index.php/checkoutcart/checkout_cart/");
    }
}
